"""Frequently used Coordinate Systems and Projections definitions
"""

#: EPSG string for WGS84
PRJ_EPSG_WGS84 = "EPSG:4326"
#: PROJ4 string for WGS84, notice it is not recommended to use proj4 string now
PRJ_STR_WGS84 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
#: WKT string for WGS84
PRJ_WKT_WGS84 = """GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.01745329251994328,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]"""

# Web Mercator (the most commonly used coordinate system for web mapping)
#: EPSG string for Web Mercator
PRJ_EPSG_WEBMERC = "EPSG:3857"
#: PROJ4 string for Web Mercator, notice it is not recommended to use proj4 string now
PRJ_STR_WEBMERC = "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"  # noqa E501
#: WKT string for Web Mercator
PRJ_WKT_WEBMERC = """PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    EXTENSION["PROJ4",
      "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
      +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
    AUTHORITY["EPSG","3857"]]
    """

NOT_COMPATIBLE_SRS_MSG = """Currently we only support data in selected coordinate system, including:
EPSG:4326 -> WGS84,
EPSG:3857 -> WebMercator,
EPSG:32601 to EPSG32660,
We are going to support other coordinate system later, in the order of:
Xian 1980 / Gauss-Kruger zone
Albers-Conic-Equal-Area in China and CONUS
UPS-South and UPS-North
EPSG:32701 to EPSG32760
"""
_compatible_epsg = list(range(32601, 32660 + 1))
_compatible_epsg.extend([4326, 3857])
COMPATIBLE_EPSG = set(_compatible_epsg)
